package com.hzeport.bgs22emduty.inbound.lsapi;

import com.hzeport.bgs22emduty.config.systemLog.OperLog;
import com.hzeport.bgs22emduty.dto.ScreenDutyLogDTO;
import com.hzeport.bgs22emduty.entity.ScreenDutyLog;
import com.hzeport.bgs22emduty.service.ScreenDutyLogService;
import com.hzeport.bgs22emduty.vo.ls.ScreenDutyLogSaveVO;
import com.hzeport.bgs22emduty.vo.ls.ScreenDutyMessageSaveVO;
import com.hzeport.bgs22emduty.common.base.BaseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;

//import org.springframework.security.access.prepost.PreAuthorize;

/**
 * ${comments}
 *
 * @author code generator
 * @date 2023-02-14 09:39:44
 */
@RestController
@AllArgsConstructor
@RequestMapping("/screendutylogls")
@Api(value = "screendutylogls", tags = "值班日志管理ls")
@Slf4j
@CrossOrigin
public class ScreenDutyLogLSController {

    private final ScreenDutyLogService screenDutyLogService;


    @ApiOperation(value = "保存")
    @RequestMapping(value = "savels",method = RequestMethod.POST)
    @OperLog(systemName = "ZBRZ",description = "RZXZ")
    public BaseResult savels( @RequestBody ScreenDutyLogSaveVO screenDutyLogSaveVO , HttpServletRequest request ) throws Exception {
        return screenDutyLogService.savels(screenDutyLogSaveVO,request);
    }

    @ApiOperation(value = "保存")
    @RequestMapping(value = "getOne",method = RequestMethod.GET)
    public BaseResult getOne(@RequestParam("id") String id, HttpServletRequest request ) {
        return screenDutyLogService.getOne(id,request);
    }

}
